import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/Login',
    method: 'get',
    params: {
      account: data.username,
      password: data.password
    }
  })
}

export function getInfo(account) {
  return request({
    url: '/getAccountData',
    method: 'get',
    params: { account }
  })
}

export function logout() {
  return request({
    url: '/logout',
    method: 'post'
  })
}

export function adminGetAccounts(params) {
  return request({
    url: '/adminGetAccounts',
    method: 'get',
    params
  })
}

export function adminAddAccount(params) {
  return request({
    url: '/adminAddAccount',
    method: 'get',
    params
  })
}
